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:
Diffstat (limited to 'src/main/webapp/js/app.min.js')
-rw-r--r--src/main/webapp/js/app.min.js4250
1 files changed, 2122 insertions, 2128 deletions
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"))}}};